﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCSanPhamMoi.ascx.cs" Inherits="UControl_UCSanPhamMoi" %>


<div>
    <asp:Label ID="lbTieuDe" runat="server" CssClass="KhoiXanhLa" 
        Text="Các sản phẩm mới" Width="100%"></asp:Label>

    <asp:DataList ID="ddlSanPhamMoi" runat="server" DataKeyField="SanPhamID" 
        DataSourceID="EntityDataSource1" Width="100%">
        <ItemTemplate>
            <asp:Image ID="hinh" runat="server" Height="116px" ImageAlign="Left"
                ImageUrl='<%# "~/Photos/SanPham/"+Eval("Hinh") %>' Width="146px" 
                CssClass="imgMarginR" />
                <b>
            <asp:HyperLink ID="tenSanPham" runat="server" 
                NavigateUrl='<%# "~/Pages/SanPhamCT.aspx?idSP="+Eval("SanPhamID") %>' 
                Text='<%# Eval("TenSanPham") %>' ForeColor="Blue"></asp:HyperLink>
                </b>
            <asp:Label ID="Label1" runat="server" 
                Text='<%# Thuvien.CatTu(Eval("MoTa").ToString(), 5) %>' />
            <br />
            <br />
        </ItemTemplate>
    </asp:DataList>
</div>
<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
    ConnectionString="name=EDiamondEntities1" 
    DefaultContainerName="EDiamondEntities1" EnableFlattening="False" 
    EntitySetName="SanPhams" OrderBy="it.SanPhamID DESC skip 0 limit 5" 
    Select="it.[SanPhamID], it.[TenSanPham], it.[MoTa], it.[Hinh], it.[MaLoai]">
</asp:EntityDataSource>

